package net.uhuijia.enums;

public enum GoodBannerType {

    image("image","图片"),video("video","视频");
    private String type;
    private String name;

    GoodBannerType(String type, String name) {
        this.type = type;
        this.name = name;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }


    public static GoodBannerType getGoodBannerType(String type){
        GoodBannerType goodBannerType = null;
        switch (type){
            case "image":
                goodBannerType = GoodBannerType.image;
                break;
            case "video":
                goodBannerType = GoodBannerType.video;
                break;
            default:
                break;
        }
        return goodBannerType;
    }
}
